<template>
  <div class="header-wrap">
    <span class="iconfont nicecaidan menu-icon"></span>
    <div class="search-wrap">
      <span class="iconfont nicesearch search-icon"></span>
      <span class="search-keyword">房间 - 刘瑞琦</span>
    </div>
    <song-icon  @openFullScreen="openFullScreen"></song-icon>
  </div>
</template>

<script>
import { mapMutations } from 'vuex'
import SongIcon from '@/components/songIcon/songIcon'
export default {
  name: 'HeaderComponent',
  components: {
    SongIcon
  },
  methods: {
    openFullScreen () {
      this.setFullScreen(true)
    },
    ...mapMutations({
      setFullScreen: 'SET_FULL_SCREEN'
    })
  }
}
</script>

<style lang="stylus" scoped>
.header-wrap {
  width: 100%;
  padding: 0.22rem 0.3rem 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background: url('../assets/images/bg.png') no-repeat top;
  background-size: cover;
  padding-bottom: 0.1rem;

  .menu-icon {
    color: #ffffff;
    font-size: 0.48rem;
    margin-left: -0.06rem;
  }

  .search-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 0.6rem;
    line-height: 0.6rem;
    flex: 1;
    background: rgba(165, 165, 165, 0.25);
    border-radius: 1rem;
    margin: 0 0.25rem;

    span {
      color: rgba(255, 255, 255, 0.4);
      margin: 0 0.08rem;
      font-size: 0.26rem;
      font-weight: 200;
    }
  }
}
</style>
